71a8c63dc151bf998758204e55753d4d6c80f8cc,org.sonarlint.eclipse.core.tests/src/test/java/org/sonarlint/eclipse/core/internal/tracking/IssueTrackerTest.java,IssueTrackerTest,should_match_server_issues_by_line_hash,#,341

Before Change


    Trackable nonMatchingTrackable = new IssueTrackable(mockIssue(), mock(TextRange.class), null, lineContent + "x");

    tracker.matchAndTrackAsNew(file1, Collections.singletonList(trackable));
    tracker.matchAndTrackAsBase(file1, Arrays.asList(movedTrackable, nonMatchingTrackable));

    assertThat(movedTrackable.getLineHash()).isEqualTo(trackable.getLineHash());
    assertThat(movedTrackable.getLineHash()).isNotEqualTo(nonMatchingTrackable.getLineHash());

After Change


    Trackable nonMatchingTrackable = new IssueTrackable(mockIssue(), mock(TextRange.class), null, lineContent + "x");

    cache.put(file1, tracker.matchAndTrackAsNew(file1, Collections.singletonList(trackable)));
    cache.put(file1, tracker.matchAndTrackAsBase(file1, Arrays.asList(movedTrackable, nonMatchingTrackable)));

    assertThat(movedTrackable.getLineHash()).isEqualTo(trackable.getLineHash());
    assertThat(movedTrackable.getLineHash()).isNotEqualTo(nonMatchingTrackable.getLineHash());